#ifndef __EKF_LCPU_I_H__
#define __EKF_LCPU_I_H__

struct lcpu_static_s
{
	 /* Initialized by do_init_alloc */
	 uint32_t initial_stack_top;
	 void (*entry) (void);

	 /* Initialized by task_init() */
	 volatile struct taskstate_s *task;
};

struct lcpu_dynamic_s
{
	 spin_lock_t start_lock;
	 /* The vpt that is delayed to be set */
	 physaddr_t vpt_delay;
};

extern          struct lcpu_static_s  lcpu_static[LAPIC_COUNT];
extern volatile struct lcpu_dynamic_s lcpu_dynamic[LAPIC_COUNT];

extern volatile struct boot_ap_info_s
{
	 int id;
	 physaddr_t vpt;
	 uint32_t stack_top;
	 spin_lock_t success_lock;
} boot_ap_info;

int lcpu_init(void);
int lcpu_set_vpt_delay(int lcpu, physaddr_t vpt);

#endif
